
function homeAdd() {
    let forData = new FormData();
    forData.append("backGround", $("#backGround")[0].files[0]);
    forData.append("title", $("#title").val());
    forData.append("roomPhoto", $("#roomPhoto")[0].files[0]);
    forData.append("href", $("#href").val());
    forData.append("token",$.cookie("token"));
    let result = imgMyAjax('/back/room/homeAdd', 'post', forData);
    if (result.result === 1) {
        alert("添加成功！");
        //页面跳转，下面两种方式都可以
        // window.location.href="";
        $("#right").load('../back/room/homeThreeRoom.html');//_blank 在新窗口中打开被链接文档。
    } else {
        alert("添加失败");
    }
}

function clearHome() {
    $("#right").load('../back/room/homeThreeRoomAdd.html')
}